<html><head>
      <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
   <title>Spring Social Facebook Reference Manual</title><link rel="stylesheet" href="css/manual.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><!--Begin Google Analytics code--><script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script><script type="text/javascript">
var pageTracker = _gat._getTracker("UA-2728886-3");
pageTracker._setDomainName("none");
pageTracker._setAllowLinker(true);
pageTracker._trackPageview();
</script><!--End Google Analytics code--></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="book" title="Spring Social Facebook Reference Manual"><div class="titlepage"><div><div><h1 class="title"><a name="spring-social-reference"></a>Spring Social Facebook Reference Manual</h1></div><div><div class="authorgroup">
      <div class="author"><h3 class="author"><span class="firstname">Craig</span> <span class="surname">Walls</span></h3></div>
      <div class="author"><h3 class="author"><span class="firstname">Keith</span> <span class="surname">Donald</span></h3></div>
    </div></div><div><p class="releaseinfo">1.0.0.RC3</p></div><div><div class="legalnotice" title="Legal Notice"><a name="d4e19"></a><p>&copy; SpringSource Inc., 2011</p></div></div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="#overview">1. Spring Social Facebook Overview</a></span></dt><dd><dl><dt><span class="section"><a href="#overview-introduction">1.1. Introduction</a></span></dt><dt><span class="section"><a href="#overview-howtoget">1.2. How to get</a></span></dt></dl></dd><dt><span class="chapter"><a href="#connecting">2. Configuring Facebook Connectivity</a></span></dt><dt><span class="chapter"><a href="#apis">3. Facebook API Binding</a></span></dt><dd><dl><dt><span class="section"><a href="#facebook-getProfile">3.1. Retrieving a user's profile data</a></span></dt><dt><span class="section"><a href="#facebook-friends">3.2. Getting a user's Facebook friends</a></span></dt><dt><span class="section"><a href="#facebook-status">3.3. Posting to and reading feeds</a></span></dt></dl></dd></dl></div>
  

  
  
    <div class="chapter" title="1.&nbsp;Spring Social Facebook Overview"><div class="titlepage"><div><div><h2 class="title"><a name="overview"></a>1.&nbsp;Spring Social Facebook Overview</h2></div></div></div>
	
	

	<div class="section" title="1.1&nbsp;Introduction"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="overview-introduction"></a>1.1&nbsp;Introduction</h2></div></div></div>
		

		<p>
			The Spring Social Facebook project is an extension to <a class="ulink" href="http://www.springframework.org/spring-social" target="_top">Spring Social</a> that enables integration with Facebook.
		</p>
		
		<p>
			With over 700 million users (and growing), <a class="ulink" href="http://www.facebook.com" target="_top">Facebook</a> is the largest online social network.
			While bringing together friends and family, Facebook also offers a rich platform on which to develop applications.
		</p>
		
		<p>
			Spring Social Facebook enables integration with Facebook with <code class="classname">FacebookConnectionFactory</code>, a connection factory that can be plugged into Spring Social's service provider connection framework, and with an API binding to Facebook's REST API.
		</p>
		
	</div>

	<div class="section" title="1.2&nbsp;How to get"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="overview-howtoget"></a>1.2&nbsp;How to get</h2></div></div></div>
		

		<p>
			The following Maven dependency will add Spring Social Facebook to your project:
		</p>

		<pre class="programlisting">
<span class="hl-tag">&lt;dependency&gt;</span>
  <span class="hl-tag">&lt;groupId&gt;</span>org.springframework.social<span class="hl-tag">&lt;/groupId&gt;</span>
  <span class="hl-tag">&lt;artifactId&gt;</span>spring-social-facebook<span class="hl-tag">&lt;/artifactId&gt;</span>
  <span class="hl-tag">&lt;version&gt;</span>${org.springframework.social-facebook-version}<span class="hl-tag">&lt;/version&gt;</span>
<span class="hl-tag">&lt;/dependency&gt;</span>
		</pre>

		<p>
			As an extension to Spring Social, Spring Social Facebook depends on Spring Social. 
			Spring Social's core module will be transitively resolved from the Spring Social Facebook dependency.
			If you'll be using Spring Social's web module, you'll need to add that dependency yourself:
		</p>

		<pre class="programlisting">
<span class="hl-tag">&lt;dependency&gt;</span>
  <span class="hl-tag">&lt;groupId&gt;</span>org.springframework.social<span class="hl-tag">&lt;/groupId&gt;</span>
  <span class="hl-tag">&lt;artifactId&gt;</span>spring-social-web<span class="hl-tag">&lt;/artifactId&gt;</span>
  <span class="hl-tag">&lt;version&gt;</span>${org.springframework.social-version}<span class="hl-tag">&lt;/version&gt;</span>
<span class="hl-tag">&lt;/dependency&gt;</span>
		</pre>

		<p>
			Note that Spring Social Facebook may release on a different schedule than Spring Social.
			Consequently, Spring Social's version may differ from that of Spring Social Facebook.
		</p>

		<p>
			Consult <a class="ulink" href="http://static.springsource.org/spring-social/docs/1.0.x/reference/html/overview.html#overview-howtoget" target="_top">Spring Social's reference documentation</a> for more information on Spring Social dependencies.
		</p>
	</div>
	
</div>
    <div class="chapter" title="2.&nbsp;Configuring Facebook Connectivity"><div class="titlepage"><div><div><h2 class="title"><a name="connecting"></a>2.&nbsp;Configuring Facebook Connectivity</h2></div></div></div>
			

	<p>
		Spring Social's <code class="classname">ConnectController</code> works with one or more provider-specific <code class="classname">ConnectionFactory</code>s to exchange authorization details with the provider and to create connections. 
		Spring Social Facebook provides <code class="classname">FacebookConnectionFactory</code>, a <code class="classname">ConnectionFactory</code> for creating connections with Facebook.
	</p>

	<p>
		So that <code class="classname">ConnectController</code> can find <code class="classname">FacebookConnectionFactory</code>, it must be registered with a <code class="classname">ConnectionFactoryRegistry</code>.
		The following class constructs a <code class="classname">ConnectionFactoryRegistry</code> containing a <code class="interfacename">ConnectionFactory</code> for Facebook using Spring's Java configuration style: 		
	</p>
	
	<pre class="programlisting">
<i><span class="hl-annotation" style="color: gray">@Configuration</span></i>
<span class="hl-keyword">public</span> <span class="hl-keyword">class</span> SocialConfig {
	
    <i><span class="hl-annotation" style="color: gray">@Bean</span></i>
    <span class="hl-keyword">public</span> ConnectionFactoryLocator connectionFactoryLocator() {
        ConnectionFactoryRegistry registry = <span class="hl-keyword">new</span> ConnectionFactoryRegistry();
        registry.addConnectionFactory(<span class="hl-keyword">new</span> FacebookConnectionFactory(
            environment.getProperty(<span class="hl-string">"facebook.clientId"</span>),
            environment.getProperty(<span class="hl-string">"facebook.clientSecret"</span>)));
        <span class="hl-keyword">return</span> registry;
    }

}
</pre>
		
	<p>
		Here, a Facebook connection factory is registered with <code class="classname">ConnectionFactoryRegistry</code> via the <code class="methodname">addConnectionFactory()</code> method.
		If we wanted to add support for connecting to other providers, we would simply register their connection factories here in the same way as <code class="classname">FacebookConnectionFactory</code>.
	</p>
	
	<p>
		Because client IDs and secrets may be different across environments (e.g., test, production, etc) it is recommended that these values be externalized. 
		As shown here, Spring 3.1's <code class="interfacename">Environment</code> is used to look up the application's client ID and secret.
	</p>

	<p>
		Optionally, you may also configure <code class="classname">ConnectionFactoryRegistry</code> and <code class="classname">FacebookConnectionFactory</code> in XML:
	</p>
		
	<pre class="programlisting">
<span class="hl-tag">&lt;bean</span> <span class="hl-attribute">id</span>=<span class="hl-value">"connectionFactoryLocator"</span> <span class="hl-attribute">class</span>=<span class="hl-value">"org.springframework.social.connect.support.ConnectionFactoryRegistry"</span><span class="hl-tag">&gt;</span>
    <span class="hl-tag">&lt;property</span> <span class="hl-attribute">name</span>=<span class="hl-value">"connectionFactories"</span><span class="hl-tag">&gt;</span>
        <span class="hl-tag">&lt;list&gt;</span>
            <span class="hl-tag">&lt;bean</span> <span class="hl-attribute">class</span>=<span class="hl-value">"org.springframework.social.facebook.connect.FacebookConnectionFactory"</span><span class="hl-tag">&gt;</span>
                <span class="hl-tag">&lt;constructor-arg</span> <span class="hl-attribute">value</span>=<span class="hl-value">"${facebook.clientId}"</span><span class="hl-tag"> /&gt;</span>
                <span class="hl-tag">&lt;constructor-arg</span> <span class="hl-attribute">value</span>=<span class="hl-value">"${facebook.clientSecret}"</span><span class="hl-tag"> /&gt;</span>				
            <span class="hl-tag">&lt;/bean&gt;</span>
        <span class="hl-tag">&lt;/list&gt;</span>
    <span class="hl-tag">&lt;/property&gt;</span>
<span class="hl-tag">&lt;/bean&gt;</span>
	</pre>	

	<p>
		This is functionally equivalent to the Java-based configuration of <code class="classname">ConnectionFactoryRegistry</code> shown before.
		The only casual difference is that the connection factories are injected as a list into the <code class="code">connectionFactories</code> property rather than with the <code class="methodname">addConnectionFactory()</code> method.
		As in the Java-based configuration, the application's client ID and secret are externalized (shown here as property placeholders).
	</p>	
		
	<p>
		Refer to <a class="ulink" href="http://static.springsource.org/spring-social/docs/1.0.x/reference/html/connecting.html" target="_top">Spring Social's reference documentation</a> for complete details on configuring <code class="classname">ConnectController</code> and its dependencies.
	</p>
		
</div>
    <div class="chapter" title="3.&nbsp;Facebook API Binding"><div class="titlepage"><div><div><h2 class="title"><a name="apis"></a>3.&nbsp;Facebook API Binding</h2></div></div></div>
	
  
	<p>
		Spring Social Facebook's <code class="interfacename">Facebook</code> interface and its implementation, <code class="classname">FacebookTemplate</code> provide the operations needed to interact with Facebook on behalf of a user.
		Creating an instance of <code class="classname">FacebookTemplate</code> is as simple as constructing it by passing in an authorized access token to the constructor:
	</p>

	<pre class="programlisting">
String accessToken = <span class="hl-string">"f8FX29g..."</span>; <span class="hl-comment">// access token received from Facebook after OAuth authorization</span>
Facebook facebook = <span class="hl-keyword">new</span> FacebookTemplate(accessToken);
	</pre>

	<p>
		In addition, <code class="classname">FacebookTemplate</code> has a default constructor that creates an instance without any OAuth credentials:
	</p>

	<pre class="programlisting">
Facebook facebook = <span class="hl-keyword">new</span> FacebookTemplate();
	</pre>

	<p>
		When constructed with the default constructor, <code class="classname">FacebookTemplate</code> will allow a few simple operations that do not require authorization, such as retrieving a specific user's profile. 
		Attempting other operations, such as posting a status update will fail with an <code class="classname">MissingAuthorizationException</code> being thrown.
	</p>

	<p>
		If you are using Spring Social's <a class="ulink" href="http://static.springsource.org/spring-social/docs/1.0.x/reference/html/serviceprovider.html" target="_top">service provider framework</a>, you can get an instance of <code class="interfacename">Facebook</code> from a <code class="interfacename">Connection</code>. 
		For example, the following snippet calls <code class="methodname">getApi()</code> on a connection to retrieve a <code class="interfacename">Facebook</code>:
	</p>				

	<pre class="programlisting">
Connection&lt;Facebook&gt; connection = connectionRepository.findPrimaryConnection(Facebook.<span class="hl-keyword">class</span>);
Facebook facebook = connection != null ? connection.getApi() : <span class="hl-keyword">new</span> FacebookTemplate();
	</pre>

	<p>
		Here, <code class="interfacename">ConnectionRepository</code> is being asked for the primary connection that the current user has with Facebook.
		If a connection to Facebook is found, a call to <code class="methodname">getApi()</code> retrieves a <code class="interfacename">Facebook</code> instance that is configured with the connection details received when the connection was first established.
		If there is no connection, a default instance of <code class="classname">FacebookTemplate</code> is created.
	</p>
		
	<p>
		With a <code class="interfacename">Facebook</code> in hand, there are several ways you can use it to interact with Facebook on behalf of the user.
		Spring Social's Facebook API binding is divided into 9 sub-APIs exposes through the methods of <code class="interfacename">Facebook</code>:
	</p>

	<pre class="programlisting">
<span class="hl-keyword">public</span> <span class="hl-keyword">interface</span> Facebook <span class="hl-keyword">extends</span> GraphApi {

    CommentOperations commentOperations();

    EventOperations eventOperations();
	
    FeedOperations feedOperations();

    FriendOperations friendOperations();
	
    GroupOperations groupOperations();

    LikeOperations likeOperations();
	
    MediaOperations mediaOperations();
	
    PlacesOperations placesOperations();
	
    UserOperations userOperations();
	
}
	</pre>

	<p>
		The sub-API interfaces returned from <code class="interfacename">Facebook</code>'s methods are described in <a class="xref" href="#table-facebook-sub-apis" title="Table&nbsp;3.1.&nbsp;Facebook's Sub-APIs">Table&nbsp;3.1, &#8220;Facebook's Sub-APIs&#8221;</a>.
	</p>

	<div class="table"><a name="table-facebook-sub-apis"></a><p class="title"><b>Table&nbsp;3.1.&nbsp;Facebook's Sub-APIs</b></p><div class="table-contents">
		
		<table summary="Facebook's Sub-APIs" style="border-collapse: collapse;border-top: 0.5pt solid ; border-bottom: 0.5pt solid ; border-left: 0.5pt solid ; border-right: 0.5pt solid ; "><colgroup><col align="left"><col></colgroup><thead><tr><th style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; " align="center">Sub-API Interface</th><th style="border-bottom: 0.5pt solid ; " align="center">Description</th></tr></thead><tbody><tr><td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; " align="left">CommentOperations</td><td style="border-bottom: 0.5pt solid ; ">Add, delete, and read comments on Facebook objects.</td></tr><tr><td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; " align="left">EventOperations</td><td style="border-bottom: 0.5pt solid ; ">Create and maintain events and RSVP to event invitations.</td></tr><tr><td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; " align="left">FeedOperations</td><td style="border-bottom: 0.5pt solid ; ">Read and post to a Facebook wall.</td></tr><tr><td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; " align="left">FriendOperations</td><td style="border-bottom: 0.5pt solid ; ">Retrieve a user's friends and maintain friend lists.</td></tr><tr><td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; " align="left">GroupOperations</td><td style="border-bottom: 0.5pt solid ; ">Retrieve group details and members.</td></tr><tr><td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; " align="left">LikeOperations</td><td style="border-bottom: 0.5pt solid ; ">Retrieve a user's interests and likes. Like and unlike objects.</td></tr><tr><td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; " align="left">MediaOperations</td><td style="border-bottom: 0.5pt solid ; ">Maintain albums, photos, and videos.</td></tr><tr><td style="border-right: 0.5pt solid ; border-bottom: 0.5pt solid ; " align="left">PlacesOperations</td><td style="border-bottom: 0.5pt solid ; ">Checkin to location in Facebook Places and retrieve places a user and their friends have checked into.</td></tr><tr><td style="border-right: 0.5pt solid ; " align="left">UserOperations</td><td style="">Retrieve user profile data and profile images.</td></tr></tbody></table>
	</div></div><br class="table-break">

	<p>
		The following sections will give an overview of common tasks that can be performed via <code class="interfacename">Facebook</code> and its sub-APIs.
		For complete details on all of the operations available, refer to the JavaDoc.
	</p>

	<div class="section" title="3.1&nbsp;Retrieving a user's profile data"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="facebook-getProfile"></a>3.1&nbsp;Retrieving a user's profile data</h2></div></div></div>
		

		<p>
			You can retrieve a user's Facebook profile data using <code class="interfacename">Facebook</code>' <code class="methodname">getUserProfile()</code> method:
		</p>

		<pre class="programlisting">
FacebookProfile profile = facebook.userOperations().getUserProfile();
	</pre>

	<p>
		The <code class="classname">FacebookProfile</code> object will contain basic profile information about the authenticating user, including their first and last name and their Facebook ID.
		Depending on what authorization scope has been granted to the application, it may also include additional details about the user such as their email address, birthday, hometown, and religious and political affiliations.
		For example, <code class="methodname">getBirthday()</code> will return the current user's birthday if the application has been granted "user_birthday" permission; null otherwise.
		Consult the JavaDoc for <code class="classname">FacebookProfile</code> for details on which permissions are required for each property.
	</p>
			
	<p>
		If all you need is the user's Facebook ID, you can call <code class="methodname">getProfileId()</code> instead:
	</p>
			
	<pre class="programlisting">
String profileId = facebook.userOperations().getProfileId();
	</pre>
			
	<p>
		Or if you want the user's Facebook URL, you can call <code class="methodname">getProfileUrl()</code>:
	</p>
			
	<pre class="programlisting">
String profileUrl = facebook.userOperations().getProfileUrl();
	</pre>

	</div>

	<div class="section" title="3.2&nbsp;Getting a user's Facebook friends"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="facebook-friends"></a>3.2&nbsp;Getting a user's Facebook friends</h2></div></div></div>
		

		<p>
			An essential feature of Facebook and other social networks is creating a network of friends or contacts. 
			You can access the user's list of Facebook friends by calling the <code class="methodname">getFriendIds()</code> method from <code class="interfacename">FriendOperations</code>:
		</p>

		<pre class="programlisting">
List&lt;String&gt; friendIds = facebook.friendOperations().getFriendIds();
		</pre>
			
		<p>
			This returns a list of Facebook IDs belonging to the current user's list of friends. 
			This is just a list of <code class="classname">String</code> IDs, so to retrieve an individual user's profile data, you can turn around and call the <code class="methodname">getUserProfile()</code>, passing in one of those IDs to retrieve the profile data for an individual user:
		</p>
			
		<pre class="programlisting">
FacebookProfile firstFriend = facebook.userOperations().getUserProfile(friendIds.get(<span class="hl-number">0</span>));
		</pre>
			
		<p>
			Or you can get a list of user's friends as <code class="classname">FacebookProfile</code>s by calling <code class="methodname">getFriendProfiles()</code>:
		</p>
			
		<pre class="programlisting">
List&lt;FacebookProfile&gt; friends = facebook.friendOperations().getFriendProfiles();
		</pre>			

		<p>
			Facebook also enables users to organize their friends into friend lists.
			To retrieve a list of the authenticating user's friend lists, call <code class="methodname">getFriendLists()</code> with no arguments: 
		</p>

		<pre class="programlisting">
List&lt;Reference&gt; friends = facebook.friendOperations().getFriendLists();
		</pre>
			
		<p>
			You can also retrieve a list of friend lists for a specific user by passing the user ID (or an alias) to <code class="methodname">getFriendLists()</code>:
		</p>

		<pre class="programlisting">
List&lt;Reference&gt; friends = facebook.friendOperations().getFriendLists(<span class="hl-string">"habuma"</span>);
		</pre>

		<p>
			<code class="methodname">getFriendLists()</code> returns a list of <code class="classname">Reference</code> objects that carry the ID and name of each friend list.
		</p>
			
		<p>
			To retieve a list of friends who are members of a specific friend list call <code class="methodname">getFriendListMembers()</code>, passing in the ID of the friend list:
		</p>
			
		<pre class="programlisting">
List&lt;Reference&gt; friends = facebook.friendOperations().getFriendListMembers(<span class="hl-string">"193839228"</span>);
		</pre>
			
		<p>
			<code class="interfacename">FriendOperations</code> also support management of friend lists.
			For example, the <code class="methodname">createFriendList()</code> method will create a new friend list for the user:
		</p>
			
		<pre class="programlisting">
Reference collegeFriends = facebook.friendOperations().createFriendList(<span class="hl-string">"College Buddies"</span>);
		</pre>
			
		<p>
			<code class="methodname">createFriendList()</code> returns a <code class="classname">Reference</code> to the newly created friend list.
		</p>
			
		<p>
			To add a friend to the friend list, call <code class="methodname">addToFriendList()</code>:
		</p>

		<pre class="programlisting">
facebook.friendOperations().addToFriendList(collegeFriends.getId(), <span class="hl-string">"527631174"</span>);
		</pre>

		<p>
			<code class="methodname">addToFriendList()</code> takes two arguments: The ID of the friend list and the ID (or alias) of a friend to add to the list.
		</p>
			
		<p>
			In a similar fashion, you may remove a friend from a list by calling <code class="methodname">removeFromFriendList()</code>:
		</p>

		<pre class="programlisting">
facebook.friendOperations().removeFromFriendList(collegeFriends.getId(), <span class="hl-string">"527631174"</span>);
		</pre>

	</div>

	<div class="section" title="3.3&nbsp;Posting to and reading feeds"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="facebook-status"></a>3.3&nbsp;Posting to and reading feeds</h2></div></div></div>
		

		<p>
			To post a message to the user's Facebook wall, call <code class="interfacename">FeedOperations</code>' <code class="methodname">updateStatus()</code> method, passing in the message to be posted:
		</p>
			
		<pre class="programlisting">
facebook.feedOperations().updateStatus(<span class="hl-string">"I'm trying out Spring Social!"</span>);
		</pre>
			
		<p>
			If you'd like to attach a link to the status message, you can do so by passing in a <code class="classname">FacebookLink</code> object along with the message:
		</p>
			
		<pre class="programlisting">
FacebookLink link = <span class="hl-keyword">new</span> FacebookLink(<span class="hl-string">"http://www.springsource.org/spring-social"</span>, 
        <span class="hl-string">"Spring Social"</span>, 
        <span class="hl-string">"The Spring Social Project"</span>, 
        <span class="hl-string">"Spring Social is an extension to Spring to enable applications to connect with service providers."</span>);
facebook.feedOperations().updateStatus(<span class="hl-string">"I'm trying out Spring Social!"</span>, link);
		</pre>
			
		<p>
			When constructing the <code class="classname">FacebookLink</code> object, the first parameter is the link's URL, the second parameter is the name of the link, the third parameter is a caption, and the fourth is a description of the link.
		</p>
			
		<p>
			If you want to read posts from a user's feed, <code class="interfacename">FeedOperations</code> has several methods to choose from.
			The <code class="methodname">getFeed()</code> method retrieves recent posts to a user's wall.
				When called with no parameters, it retrieves posts from the authenticating user's wall:
		</p>
			
		<pre class="programlisting">
List&lt;Post&gt; feed = facebook.feedOperations().getFeed();
		</pre>
			
		<p>
			Or you can read a specific user's wall by passing their Facebook ID to <code class="methodname">getFeed()</code>:
		</p>			

		<pre class="programlisting">
List&lt;Post&gt; feed = facebook.feedOperations().getFeed(<span class="hl-string">"habuma"</span>);
		</pre>

		<p>
			In any event, the <code class="methodname">getFeed()</code> method returns a list of <code class="classname">Post</code> objects.
			The <code class="classname">Post</code> class has six subtypes to represent different kinds of posts:
		</p>
			
		<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p><code class="classname">CheckinPost</code> - Reports a user's checkin in Facebook Places.</p></li><li class="listitem"><p><code class="classname">LinkPost</code> - Shares a link the user has posted.</p></li><li class="listitem"><p><code class="classname">NotePost</code> - Publicizes a note that the user has written.</p></li><li class="listitem"><p><code class="classname">PhotoPost</code> - Announces a photo that the user has uploaded.</p></li><li class="listitem"><p><code class="classname">StatusPost</code> - A simple status.</p></li><li class="listitem"><p><code class="classname">VideoPost</code> - Announces a video that the user has uploaded.</p></li></ul></div>
			
		<p>
			The <code class="classname">Post</code>'s <code class="methodname">getType()</code> method identifies the type of <code class="classname">Post</code>.
		</p>			
	</div>

</div>
</div><!--Begin LoopFuse code--><script src="http://loopfuse.net/webrecorder/js/listen.js" type="text/javascript"></script><script type="text/javascript">
_lf_cid = "LF_48be82fa";
_lf_remora();
</script><!--End LoopFuse code--></body></html>